package com.weishi.project.training.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.models.auth.In;
import lombok.Data;
import com.weishi.framework.aspectj.lang.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;


/**
 * 测功仪数据
 */
@Data
@TableName("tbl_dynamometer")
public class Dynamometer implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 测功仪表（ 主键 id  ） */
    private Integer id;
    
    /** 运动员 id */
    @Excel(name = "运动员 id")
    private Integer sportsmanId;
    
    /** 训练日 id */
    @Excel(name = "训练日 id")
    private Integer trainingDayId;
    
    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;
    
    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;
    
    /** 里程 */
    @Excel(name = "里程")
    private Double mileage;
    
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ctime;

    @Excel(name = "桨频")
    private String propellerFrequency;

    @Excel(name = "心率")
    private Integer heartRate;

    @Excel(name = "时长")
    private String lengthTime;

    @Excel(name = "速度")
    private Double speed;

    @Excel(name = "平均功率")
    private String power;

    @Excel(name = "瓦特")
    private String watt;

    @Excel(name = "峰力")
    private Double peakForce;

    @Excel(name = "均力")
    private Double averageForce;

    @Excel(name = "桨数")
    private Integer pulpNumber;

    @Excel(name = "分组 id")
    private Integer groupId;

    @Excel(name = "分组名称")
    private String groupName;

    @Excel(name = "成绩 id")
    private Integer channelId;

    @Excel(name = "判断时间还是公里数 0 是公里数 1 是时间")
    private Integer trainingMode;

    @Excel(name = "分段号（1，2，3，4，5，6，7，8，9，）")
    private Integer segmentNumber;

    @Excel(name = "性别 （ 0：男 ，1：女 ）")
    private Integer sex;

    @Excel(name = "运动员名称")
    private String sportsmanName;

    /**
     * 平均心率
     */
    @TableField(exist = false)
    private Integer averageHeartRate;

    /**
     * 最大心率
     */
    @TableField(exist = false)
    private Integer maxHeartRate;

    /**
     * 平均桨频
     */
    @TableField(exist = false)
    private String averagePropellerFrequency;

    /**
     * 平均功率
     */
    @TableField(exist = false)
    private String averagePower;

    /**
     * 平均瓦特
     */
    @TableField(exist = false)
    private String averageWatt;

    /**
     * 平均速度
     */
    @TableField(exist = false)
    private Double averageSpeed;

    /**
     * 平均峰力
     */
    @TableField(exist = false)
    private Double averagePeakForce;

    /**
     * 平均均力
     */
    @TableField(exist = false)
    private Double averageForces;

    /**
     * jsonData 数据
     */
    private String jsonData;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Dynamometer that = (Dynamometer) o;
        return Objects.equals(mileage, that.mileage);
    }

    @Override
    public int hashCode() {

        return 1;
    }
}